NGram
Implements the N-Gram Similarity (Kondrak, 2005) between strings.
The algorithm uses affixing with special character '\0' to increase the weight of first characters. The normalization is achieved by dividing the total similarity score the original length of the longest word.
The similarity is computed as \(1 - distance(X, Y)\).
References
Kondrak, G. (2005-11-02). N-gram similarity and distance. In String processing and information retrieval, lecture notes in computer science (Pages 115-126). Springer Berlin Heidelberg. https://doi.org/10.1007/11575832_13[sci-hub]
Author
Thibault Debatty, solonovamax